package com.mrdeer.user.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Mybatis-Plus 配置
 *
 * @author ：xie jianchu
 * @date ：Created in 2020/9/7 0007 17:23
 */
@Configuration
@MapperScan("com.mrdeer.user.**.mapper")
public class MyBatisPlusConfig {
    /**
     * 分页插件，自动识别数据库类型
     *
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
